package com.sqm.sync_tool.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author sxubo
 * @since 2020-10-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
public class SysUser extends Model<SysUser> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "user_id", type = IdType.ID_WORKER_STR)
    private String userId;

    /**
     * 员工编号
     */
    @TableField("user_number")
    private String userNumber;

    /**
     * 用户名
     */
    @TableField("usename")
    private String usename;

    /**
     * 手机号
     */
    @TableField("telephone")
    private String telephone;

    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 盐
     */
    @TableField("salt")
    private String salt;

    /**
     * 状态(-1:停用，1启用)
     */
    @TableField("status")
    private Integer status;

    /**
     * 操作时间
     */
    @TableField("operation_time")
    private Date operationTime;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
